﻿using System;
using Microsoft.Xna.Framework.Content;
using ProtoGame.GameLib;
using Microsoft.Xna.Framework.Graphics;
using ProtoGame.GameLib.Entities;

namespace ProtoGame.DescritoresContent
{
    class PGIMGSpriteFantasma
    {
        private const ushort tileWidth = 128;
        private const ushort tileHeight = 128;

        public const byte StateNormal = 0;
        public const byte StateAtacando = 1;

        public static Tileset CriarTileset(ContentManager content)
        {
            return new Tileset(content.Load<Texture2D>(@"Images\Sprites\Fantasma"), tileWidth, tileHeight);
        }

        public static Animator CriarAnimator()
        {
            Animator fantasmaAnim = new Animator();

            fantasmaAnim.AddAnimation(StateNormal, 0, 3, SpriteEffects.None, TimeSpan.FromSeconds(1 / 10.0), true);
            fantasmaAnim.AddAnimation(StateAtacando, 4, 7, SpriteEffects.None, TimeSpan.FromSeconds(1 / 10.0), false);

            return fantasmaAnim;
        }
    }
}
